import Layout from '@/layout'
// 系统设置
const operationRouter = {
  path: '/operation',
  component: Layout,
  redirect: 'noRedirect',
  name: 'Operation',
  meta: {
    title: '系统设置',
    icon: 'clipboard',
    roles: ['admin']
  },
  children: [
   /* {
      path: 'setting',
      name: 'setting',
      component: () => import('@/views/systemSetting/setting'),
      meta: {
        title: '系统设置',
        icon: 'clipboard'
      }
    },
    {
      path: 'onePass',
      name: 'onePass',
      component: () => import('@/views/sms/smsConfig'),
      meta: {
        title: '一号通',
        icon: 'clipboard'
      }
    },*/
    {
      path: 'roleManager',
      name: 'RoleManager',
      redirect: 'noRedirect',
      component: () => import('@/views/systemSetting/administratorAuthority'),
      meta: {
        title: '管理权限',
        icon: 'clipboard',
        roles: ['admin']
      },
      children: [
        {
          path: 'wladmin',
          component: () => import('@/views/index'),
          redirect: 'noRedirect',
          name: 'Wladmin',
          meta: { title: '管理端', icon: '' },
          children:[
            {
              path: 'identityManager/:type?',
              component: () => import('@/views/systemSetting/administratorAuthority/identityManager'),
              name: 'IdentityManager',
              meta: { title: '身份管理', icon: '' }
            },
            {
              path: 'adminList/:type?',
              component: () => import('@/views/systemSetting/administratorAuthority/adminList'),
              name: 'AdminList',
              meta: { title: '管理员列表', icon: '' }
            },
            {
              path: 'promiseRules/:type?',
              component: () => import('@/views/systemSetting/administratorAuthority/permissionRules'),
              name: 'PromiseRules',
              meta: { title: '权限规则', icon: '' }
            },
          ]
        },
        {
          path: 'logistics',
          component: () => import('@/views/systemSetting/administratorAuthority'),
          redirect: 'noRedirect',
          name: 'Logistics',
          meta: { title: '承运端', icon: '' },
          children:[
            {
              path: 'identityManager/:type?',
              component: () => import('@/views/systemSetting/administratorAuthority/identityManager'),
              name: 'IdentityManager',
              meta: { title: '身份管理', icon: '' }
            },
            {
              path: 'adminList/:type?',
              component: () => import('@/views/systemSetting/administratorAuthority/adminList'),
              name: 'AdminList',
              meta: { title: '管理员列表', icon: '' }
            },
            {
              path: 'promiseRules/:type?',
              component: () => import('@/views/systemSetting/administratorAuthority/permissionRules'),
              name: 'PromiseRules',
              meta: { title: '权限规则', icon: '' }
            },
          ]
        },
      ]
    },
    /*
    {
      path: 'systemSms',
      component: () => import('@/views/sms'),
      name: 'systemSms',
      meta: {
        title: '短信设置',
        icon: 'clipboard',
        roles: ['admin']
      },
      children: [
        {
          path: 'config',
          component: () => import('@/views/sms/smsConfig'),
          name: 'SmsConfig',
          meta: { title: '短信账户', noCache: true }
        },
        {
          path: 'template',
          component: () => import('@/views/sms/smsTemplate'),
          name: 'SmsTemplate',
          meta: { title: '短信模板', noCache: true, activeMenu: `/operation/onePass` }
        },
        {
          path: 'pay',
          component: () => import('@/views/sms/smsPay'),
          name: 'SmsPay',
          meta: { title: '短信购买', noCache: true, activeMenu: `/operation/onePass` }
        },
        {
          path: 'message',
          component: () => import('@/views/sms/smsMessage'),
          name: 'SmsMessage',
          meta: { title: '短信开关', noCache: true }
        }
      ]
    },
    {
      path: 'storeService',
      component: () => import('@/views/systemSetting/storeService'),
      name: 'StoreService',
      meta: {
        title: '客服管理',
        icon: 'clipboard',
        roles: ['admin']
      },
      children: [
        {
          path: 'list',
          component: () => import('@/views/systemSetting/storeService/chatRoom'),
          name: 'StoreServiceList',
          meta: { title: '客服列表', noCache: true }
        },
        {
          path: 'chatRoom',
          component: () => import('@/views/systemSetting/storeService/list'),
          name: 'ChatRoom',
          meta: { title: '聊天室', noCache: true }
        }
      ]
    },
    {
      path: 'design',
      name: 'design',
      alwaysShow: true,
      component: () => import('@/views/systemSetting/design'),
      meta: {
        title: '客户端页面管理',
        roles: ['admin']
      },
      children: [
        {
          path: 'viewDesign',
          component: () => import('@/views/systemSetting/design/viewDesign'),
          name: 'viewDesign',
          meta: { title: '页面设计', noCache: true }
        },
        {
          path: 'theme',
          component: () => import('@/views/systemSetting/design/theme'),
          name: 'theme',
          meta: { title: '一键换色', noCache: true }
        },
        {
          path: 'pcViewDesign',
          component: () => import('@/views/systemSetting/design/pcViewDesign'),
          name: 'pcViewDesign',
          meta: { title: 'PC商城', noCache: true }
        },
      ]
    },
    {
      path: 'deliverGoods',
      name: 'deliverGoods',
      alwaysShow: true,
      component: () => import('@/views/systemSetting/deliverGoods'),
      meta: {
        title: '发货设置',
        roles: ['admin']
      },
      children: [
        {
          path: 'takeGoods',
          component: () => import('@/views/systemSetting/deliverGoods/takeGoods'),
          name: 'takeGoods',
          meta: { title: '提货设置', noCache: true,roles: ['admin'] },
          children: [
            {
              path: 'deliveryAddress',
              component: () => import('@/views/systemSetting/deliverGoods/takeGoods/deliveryAddress'),
              name: 'deliveryAddress',
              meta: { title: '提货点', icon: '' }
            },
            {
              path: 'collateOrder',
              component: () => import('@/views/systemSetting/deliverGoods/takeGoods/collateOrder'),
              name: 'collateOrder',
              meta: { title: '核销订单', icon: '' }
            },
            {
              path: 'collateUser',
              component: () => import('@/views/systemSetting/deliverGoods/takeGoods/collateUser'),
              name: 'collateUser',
              meta: { title: '核销员', icon: '' }
            },
          ]
        },
        {
          path: 'freightSet',
          component: () => import('@/views/systemSetting/deliverGoods/freightSet'),
          name: 'freightSet',
          meta: { title: '运费模板', noCache: true }
        },
      ]
    },*/
  ]
}

export default operationRouter  //collate
